﻿Option Explicit On
Public Class frmMain

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        WebBrowser.Navigate("http://translate.google.cn/?hl=zh-CN&tab=wT#en|zh-CN|fuck")
    End Sub

    Private Sub WebBrowser_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser.DocumentCompleted
        Try
            If WebBrowser.Url.ToString = "http://translate.google.cn/?hl=zh-CN&tab=wT#en|zh-CN|fuck" Then
                Dim a As String = WebBrowser.Document.GetElementById("gt-res-c").InnerHtml
                'MsgBox(a)
                WebBrowser.Document.Write(WebBrowser.Document.GetElementById("gt-res-c").InnerHtml)
                'Else
                '    MsgBox(WebBrowser.Url.ToString + vbCrLf + WebBrowser.Document.GetElementById("gt-src-wrap").InnerText)
            End If
        Catch ex As Exception
            MsgBox("Error : " & ex.Message & ex.TargetSite.ToString)
        End Try

    End Sub

    Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class
